import os

from flask import Flask

from applications.controller import register_bps
from applications.extensions import init_plugs


def create_app():
    app = Flask(__name__)
    # 注册子蓝图
    register_bps(app)
    # 注册flask组件,登录,异常处理之类
    init_plugs(app)
    return app
